package LanJieQi

import (
	"fmt"
	"net/http"
)

func HTTPInterceptor(h http.HandlerFunc) http.HandlerFunc {
	return http.HandlerFunc(
		func(w http.ResponseWriter, r *http.Request) {
			r.ParseForm()
			// TODO: 进行身份验证，比如校验cookie或token
			h(w, r)
		})
}

// http server
func SayHello2(w http.ResponseWriter, r *http.Request) {
	fmt.Println("有人访问了hello接口")
	http.Redirect(w,r,"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx48dc5e85be6aad90&redirect_uri=http%3a%2f%2fvocaloid.utools.club%2fWeiXinCode&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect", http.StatusFound) //跳转到百度
}
